package abc;

import org.springframework.beans.factory.config.ConstructorArgumentValues;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.GenericBeanDefinition;
import org.springframework.context.annotation.ImportBeanDefinitionRegistrar;
import org.springframework.core.type.AnnotationMetadata;

public class C implements ImportBeanDefinitionRegistrar {
    @Override
    public void registerBeanDefinitions(AnnotationMetadata metadata, BeanDefinitionRegistry reg) {
        GenericBeanDefinition beanDef = new GenericBeanDefinition();
        beanDef.setBeanClassName("abc.B3");
        ConstructorArgumentValues arg = new ConstructorArgumentValues();
        arg.addIndexedArgumentValue(0,"hello");
        beanDef.setConstructorArgumentValues(arg);

        reg.registerBeanDefinition("c3",beanDef);

    }
}
